| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | const { join } = require('path') |
||
| 8 | describe('Rules helper', () => { |
||
| 9 | it('input is a file path', () => { |
||
| 10 | getAllRuleName.mockImplementation(() => ['a', 'b', 'c', 'd']) |
||
| 11 | load.mockImplementation(name => name) |
||
| 12 | const options = { |
||
| 13 | order: ['c', 'x', 'a'], |
||
| 14 | path: 'rules' |
||
| 15 | } |
||
| 16 | const expected = [ |
||
| 17 | join(__dirname, '../../rules', 'c'), |
||
| 18 | join(__dirname, '../../rules', 'a') |
||
| 19 | ] |
||
| 20 | const ruleFunc = loadRules(options) |
||
| 21 | expect(ruleFunc).toEqual(expected) |
||
| 22 | }) |
||
| 23 | }) |
||
| 24 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.